<html>
    <head>
        <script src="../../modules.js"></script>
        <script>require('environment.js').setDebug();</script>
    </head>
    <body>
        <script type="text/javascript" language="javascript">
        var test = require('test.js'); with (test) {
        var modules = require('modules.js');
        test.listenReady(function () {

            var a = 10;

            var pass = false;
            try {
                modules.evalJail("a = 20; assertEq(a, 20)", test);
            } catch (exception) {
                output('<b>Exception:</b> ' + exception);
            }

            assertEq(a, 10);
            assertEq(global.a, 20);
            
        }); /* listen ready */
        }; /* with test */
        </script>
    </body>
</html>
